package com.yjq.programmer.dto;

import com.yjq.programmer.annotation.ValidateEntity;

import java.util.Date;

/**
 * @author 杨杨吖
 * @QQ 823208782
 * @WX yjqi12345678
 * @create 2022-11-21 15:19
 */
public class CommentDTO {

    private String id;

    @ValidateEntity(required=true,requiredMaxLength=true,requiredMinLength=true,maxLength=256,minLength=1,errorRequiredMsg="评论内容不能为空！",errorMaxLengthMsg="评论内容长度不能大于256！",errorMinLengthMsg="评论内容不能为空！")
    private String content;

    @ValidateEntity(required=true,errorRequiredMsg="评论所属音乐不能为空！")
    private String musicId;

    private MusicDTO musicDTO;

    @ValidateEntity(required=true,errorRequiredMsg="评论所属用户不能为空！")
    private String userId;

    private UserDTO userDTO;

    private Date createTime;

    private String token;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getMusicId() {
        return musicId;
    }

    public void setMusicId(String musicId) {
        this.musicId = musicId;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public MusicDTO getMusicDTO() {
        return musicDTO;
    }

    public void setMusicDTO(MusicDTO musicDTO) {
        this.musicDTO = musicDTO;
    }

    public UserDTO getUserDTO() {
        return userDTO;
    }

    public void setUserDTO(UserDTO userDTO) {
        this.userDTO = userDTO;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", content=").append(content);
        sb.append(", musicId=").append(musicId);
        sb.append(", userId=").append(userId);
        sb.append(", createTime=").append(createTime);
        sb.append(", musicDTO=").append(musicDTO);
        sb.append(", userDTO=").append(userDTO);
        sb.append(", token=").append(token);
        sb.append("]");
        return sb.toString();
    }
}
